package com.city.domain.pub;

import javax.persistence.*;
import java.util.Objects;

/**
 * @deprecation: 公共文件索引
 * @dmail: 398521613@qq.com
 * @author: L-H
 * @date: 2018-07-18 13:14
 */
@Entity
@Table(name = "pub_filepath", schema = "city", catalog = "")
public class PubFilepath {
    private int id;//主键
    private String tableName;//表名称
    private String idIndex;//表中主索引
    private String filePath;//文件地址
    private int typeId;//文件类别id
    private String updateTime;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "table_name")
    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    @Basic
    @Column(name = "id_index")
    public String getIdIndex() {
        return idIndex;
    }

    public void setIdIndex(String idIndex) {
        this.idIndex = idIndex;
    }

    @Basic
    @Column(name = "file_path")
    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    @Basic
    @Column(name = "type_id")
    public int getTypeId() {
        return typeId;
    }

    public void setTypeId(int typeId) {
        this.typeId = typeId;
    }

    @Basic
    @Column(name = "update_time")
    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PubFilepath that = (PubFilepath) o;
        return id == that.id &&
                idIndex == that.idIndex &&
                typeId == that.typeId &&
                Objects.equals(tableName, that.tableName) &&
                Objects.equals(filePath, that.filePath) &&
                Objects.equals(updateTime, that.updateTime);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, tableName, idIndex, filePath, typeId, updateTime);
    }

    @Override
    public String toString() {
        return "PubFilepath{" +
                "id=" + id +
                ", tableName='" + tableName + '\'' +
                ", idIndex='" + idIndex + '\'' +
                ", filePath='" + filePath + '\'' +
                ", typeId=" + typeId +
                ", updateTime='" + updateTime + '\'' +
                '}';
    }
}
